From: Adel Gadllah Date: Mon, 11 Feb 2013 16:16:44 +0000 (+0100) Subject: userMenu: Handle the case where the user has no icon file X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4908 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4ab1e893f06a39bfc089cd87dbb5f15ce549c166;p=gnome-shell.git userMenu: Handle the case where the user has no icon file Fix a crash in UserAvatarWidget.update that gets triggered when the user has no icon file. https://bugzilla.gnome.org/show_bug.cgi?id=693385 --- diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js index 9bffe67d9..1196c662d 100644 --- a/js/ui/userMenu.js +++ b/js/ui/userMenu.js @@ -68,7 +68,7 @@ const UserAvatarWidget = new Lang.Class({ update: function() { let iconFile = this._user.get_icon_file(); - if (!GLib.file_test(iconFile, GLib.FileTest.EXISTS)) + if (iconFile && !GLib.file_test(iconFile, GLib.FileTest.EXISTS)) iconFile = null; if (iconFile) {